<%--
  Author: chengwei
  Date: 2016/7/18
  Time: 10:15
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="modal-dialog" role="document">

    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                    aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">修改栏目</h4>
        </div>
        <div class="modal-body">
            <form id="frm" class="form-horizontal">
                <input type="hidden" name="columnId" id="columnId" value="${column.columnId}"/>

                <div class="form-group">
                    <label for="name" class="col-sm-2 control-label">名称</label>

                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="name" name="name" value="${column.name}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="showOrder" class="col-sm-2 control-label">显示顺序</label>

                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="showOrder" name="showOrder" value="${column.showOrder}">
                    </div>
                </div>
            </form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="button" onclick="doSaveColumn();" class="btn btn-primary">保存</button>
        </div>
    </div>

    <script>
        function doSaveColumn() {
            
            $.post("/user/column/save",$("#frm").serializeArray(), function (d) {
                $("#myModal").modal("hide");
//                reloadList();
                window.location.reload();
            });
        }

        
    </script>
</div>
